package com.night.administration.mapper;

import com.night.common.entity.administration.Classes;
import com.night.common.entity.administration.CourseManager;
import com.night.common.entity.administration.vo.CourseMangerQueryVo;
import com.night.common.entity.administration.vo.TimeVo;
import com.night.common.entity.student.Student;
import org.apache.ibatis.annotations.Param;

import java.sql.Time;
import java.util.List;

/**
 * @ClassName: CourseManagerMapper
 * @Description: //TODO
 * @author: LZJ
 * @date: 2022/10/19-16:13
 * @version: v1.0
 */
public interface CourseManagerMapper {
    //增加课程管理
    void insert(CourseManager courseManager);

    //根据教师id查询所有学生
    List<Student> getStudentByCourseManagerId(@Param("courseManagerId") int courseManagerId);

    /**
     * @param courseMangerQueryVo
     * @return java.util.List<com.night.common.entity.administration.CourseManager>
     * @author Dark-Morning
     * 2022/10/25 19:00
     **/
    List<CourseManager> getCourseManagerByTeacher(CourseMangerQueryVo courseMangerQueryVo);

    //多条件查询课程表
    List<CourseManager> getByCondition(CourseManager courseManager);

    //根据教师id查询出教师所有的课程
    List<CourseManager> getCourseManagerByTeacherId(int teacherId);

    //根据教师id及状态查询学生id(选修课学生id)
    int[] getStudentByCourseId(int courseId);

    //判断加课程时间是否冲突
    void checkTime(TimeVo timeVo);

    //根据week和班级查询课程
    List<CourseManager> getCourseByWeek(@Param("courseWeek") String week, @Param("classId") int classId);

    //根据教师id和week查询教师的所有课程
    List<CourseManager> getCourseByTeacherIdAndWeek(@Param("courseWeek") String week, @Param("teacherId") int teacherId);

    //根据week和课程开始时间查询课程教室
    List<CourseManager> getArea(@Param("courseWeek") String week, @Param("courseStartTime") Time courseStartTime);
}
